<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hello point</title>
</head>
<body onload="main()">
<canvas id="gl" width="400" height="400"></canvas>
</body>
<!--<script src="./lib/webgl-utils.js"></script>-->
<!--<script src="./lib/webgl-debug.js.js"></script>-->
<script>
    function main() {
        const canvas = document.getElementById('gl')
        const gl = canvas.getContext('webgl')
        const vSource = `
            void main(){
                gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
                gl_PointSize = 10.0
            }
        `
        const fSource = `
            void main(){
                gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
            }
        `
        gl.createShader()
        gl.shaderSource()
        if(!initShaders(gl,vSource,fSource)){
            console.log('init failed')
            return
        }
        gl.clearColor(0.0,0.0,0.0,1.0)
        gl.clear(gl.COLOR_BUFFER_BIT)
    }

</script>

</html>